home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-07-29 | 14.7 KB | 342 lines | [TEXT/Moml] |
- Mosml Mac 1.42e Release Notes 1997July25 e [Doug Currie <e@flavors.com>]
-
- These are release notes for the Macintosh version of Moscow ML 1.42.
- See the Moscow ML distribution for non-Mac-specific notes.
-
- Changes since Moscow ML 1.41e
-
- (* *) known bugs
-
- Denormalized floating point numbers cannot be read. These are numbers between
- zero and approximately +/-2.23e-308. See the section on MSL 2.1.2 below for
- more info on how this will be addressed.
-
- (* *) mosml-mac implemented as a shared library on PPC
-
- The PPC version of mosml-mac is now supplied as a pair of files: a shared
- library containing the bulk of mosml with the user interface, and a small (16k
- byte) application. The two files must be in the same folder, or else the shared
- library must in the extensions folder in the system folder.
-
- The advantage of the shared library implementation is that multiple copies of
- mosml-mac can be made without consuming a lot of disk space. [When running with
- virtual memory enabled, less RAM will be used, too.] Why would one want
- multiple copies of mosml-mac? Read on, and you'll see that with the addition of
- AppleScript support, and the ability to use mosml created cgi applications,
- there are many reasons to have a few copies of mosml apps on your machine.
-
- Actually, there are two PPC shared libraries and two applications supplied with
- mosml-mac. One lib/app pair is the general purpose toplevel mosml application,
- the other lib/app pair is specifically for cgi applications. See cgi below.
-
- (* *) mosml-mac implemented as SANE application on 68k
-
- The 68k version of mosml mac is supplied as a pair (general purpose & cgi) of
- monolithic SANE applications. In the past, I supplied both SANE and m68881
- versions. I decided that the archive would be too big with four copies of the
- 68k apps, and that m68881 support was a marginal feature.
-
- While the Mac does have a shared library mechanism for 68k code, called Code
- Fragment Manager (CFM-68k), it requires a system extension that has until very
- recently been quite buggy. I'm also not sure about its processor and system
- software requirements, either. So, I opted to leave it unsupported.
-
- If you are disappointed by these decisions, please let me know. If there is
- enough interest (i.e., one person who is willing to serve as a test subject),
- I will create a release with m68881 and/or CFM-68k support. Or, if you have
- MetroWerks CodeWarrior, I'll walk you through creating it yourself. If anyone
- does try CFM-68k, please let me know how it works out for you.
-
- (* *) drag and drop images
-
- You can now drag and drop mosml images onto mosml-mac to launch them.
- This doesn't work after mosml-mac is running of course! (Quit first.)
- This overrides the image pathname heuristic, see below.
-
- (* *) image pathname heuristic
-
- Before using the default image name in the econfigstrs resource, mosml-mac
- checks for an image name which, minus the pathname extension, matches the
- application name, also minus the extension, in the same folder.
- Specific extensions are required:
-
- runtime application (e.g., a copy of mosml142app): ".app"
- cgi application (e.g., a copy of mosml142cgi): ".cgi"
- image: ".image"
-
- For example, launching frob.app will try to load frob.image, but if it fails
- to find an image of that name, will resort to the name in the econfigstrs
- resource. Dragging and dropping an image onto frob.app will override this
- behavior: the dropped image will be used instead.
-
- This is especially useful for cgi applications (see the next section). In
- this case, for example, a copy of mosml142cgi named "echo.cgi" will run the
- image named "echo.image" when launched from a web server.
-
- (* *) cgi support
-
- A version of mosml-mac which accepts cgi AppleEvents ('WWWΩ' 'sdoc') is
- provided, mosml142cgi. This application is a full mosml runtime, but it does
- not have a console or editor. It should only be launched by a web server,
- which will send the application a cgi AppleEvent. All output to stdOut is
- collected and returned to the web server in an AppleEvent reply at exit.
-
- The environment of mosml142cgi is extended with several new variables. These
- correspond to the UNIX CGI environment variables as closely as possible. They
- can be obtained with Process.getEnv. In some cases stdIn will supply
- additional data for the cgi request, e.g., POST. Use the environment variable
- CONTENT_LENGTH to determine the number of characters waiting at stdIn.
-
- The new environment variables are documented below.
-
- The easiest method for constructing a mosml-mac cgi is as follows:
-
- 1/ copy mosml142cgi
- 2/ rename it "X.cgi"
- where X is a name of your choice
- but shouldn't have spaces, slashes, or other nasty characters in it
- 3/ make and link your mosml cgi program; name it "X.image"
- 4/ move X.cgi and X.image to a folder accessible to your web server
- 5/ point an http link at X.cgi
-
- Examples are located in the e_SML:cgi: folder.
-
- mosml142cgi has a bare minimum user interface: Quit. Quitting should only
- be necessary when your X.image has a bug which prevents it from exiting.
- You can Quit from the File menu or with Command-Q.
-
- (* *) new environment variables
-
- In all versions of mosml-mac:
-
- VERSION -- from application resource fork
- CAMLRUNPARAM -- from application resource fork
- PATH_TRANSLATED -- constructed at launch time
-
- Examples:
-
- - load "Process";
- > val it = () : unit
- - Process.getEnv "VERSION";
- > val it = SOME "mosml 1.42e" : string option
- - Process.getEnv "CAMLRUNPARAM";
- > val it = SOME "v=0i=50000s=50000o=20" : string option
- - Process.getEnv "PATH_TRANSLATED";
- > val it = SOME "jalaMPW:ml:mosml142:mosml142app" : string option
- -
-
- In the mosml142cgi version of mosml-mac only,
- these are all constructed from the ('WWWΩ' 'sdoc') cgi AppleEvent:
-
- var Mac AE name description
- ---------- ------------ -------------
- PATH_INFO '----' : arguments following the "$" in a URL
-
- QUERY_STRING 'kfor' : arguments following a "?" in a URL
-
- REMOTE_HOST 'addr' : Domain name of client (or IP address if no DNS)
-
- REMOTE_ADDR 'Kcip' : the TCP/IP address of the client
-
- REMOTE_USER 'user' : Username if authentication was required
-
- REMOTE_PASS 'pass' : Password if authentication was required
-
- REQUEST_METHOD 'meth' : the HTTP method being requested (e.g., GET,
- GET_CONDITIONAL, POST, etc.)
-
- SCRIPT_NAME 'scnm' : The (raw) path of the CGI being executed
-
- SERVER_NAME 'svnm' : Domain name of server (or IP address if no DNS)
-
- SERVER_PORT 'svpt' : TCP/IP port server is listening on
-
- HTTP_REFERER 'refr' : URL of page from which this CGI was referenced
-
- HTTP_USER_AGENT 'Agnt' : The WWW client software name and version
-
- GATEWAY_INTERFACE 'Kact' : The action being performed by the CGI,
- either the name of the user defined action or
- one of the strings: CGI, ACGI, PREPROCESSOR,
- POSTPROCESSOR, ERROR, INDEX, or NOACCESS.
-
- CONTENT_TYPE 'ctyp' : MIME type of POST arguments if present
-
- CONTENT_LENGTH 'post' : the size of the POST data;
- the POST data are placed on stdIn
-
- References:
- (UNIX) http://hoohoo.ncsa.uiuc.edu/cgi/interface.html
- (Mac ) http://www.starnine.com/support/technotes/cgiparams-table.html
-
- (* *) Processes.system is now implemented
-
- The text argument to system() is sent to the AppleScript compiler and executed
- as long as AppleScriptLib is in the Extensions folder. This is only tested on
- PowerMacs. Using AppleScript and system() you can now send AppleEvents to other
- applications, e.g., send e-mail, launch applications with the Finder, etc.
-
- (* *) AppleScript library module
-
- The module AppleScript supplies facilities for compiling, running, and
- receiving results from AppleScripts. Examples are provided in e_SML of using
- AppleScript from mosml to communicate with Microsoft Excel and Eudora. Many
- Mac applications support scripting via AppleScript.
-
- There are also many libraries of scripting additions available for use with
- AppleScript, e.g., speech, encryption, etc. These libraries must be placed in
- your extensions folder to be used from mosml-mac.
-
- (* *) AppleEvent «event miscdosc»
-
- Mosml142app supports an AppleEvent at launch to supply the command line to
- mosml. Using the AppleScript library module, a second copy of mosml142app can
- be employed to run specified images with command line arguments. I use this
- mechanism to bootstrap mosml from one version to the next.
- See e_SML:bootstrap: for examples.
-
- (* *) now compiled with CodeWarrior Pro 1 and MSL 2.1.2+
-
- The MetroWerks CodeWarrior Pro 1 release greatly improved the organization of
- all the mosml-mac project files. It also necessitated a conversion from the
- Plum Hall Standard C Library to the Metrowerks Standard Library (MSL).
- Unfortunately, the MSL has several bugs which affect mosml-mac. Many are
- corrected with patches supplied as updated to MSL source files; this requires
- rebuilding the libraries used in mosml. Some are patched with source files in
- the mosml project.
-
- With the patches, the only know bugs remaining are in the area of floating
- point reading and writing. Metrowerks is working on this. Denormalized floats
- cannot be read at all. Printing of floats is slightly inaccurate (i.e., in the
- one or two LSBs of a double), and printf() rounds toward +/-infinity instead
- of nearest or even. I have included a patch of my own to improve rounding in
- printf() for some common cases, but the real solution is a complete rewrite of
- strtod() and printf(). I will wait to see if MSL improves soon before I take
- this on myself.
-
- A patch file rename_patch.c is included in the source distribution to make
- rename work for directories again. The linker warnings:
- Link Warning : ignored ‘__rename_file’ (code) in MSL C.PPC (NL).Lib
- Previously defined in rename_patch.c
- Link Warning : ignored ‘__rename_file’ (descriptor) in MSL C.PPC (NL).Lib
- Previously defined in rename_patch.c
- can be safely ignored.
-
- MCL 2.1.2 epoch is 1900 not 1904, sometimes -- ugh! Patches supplied by MW.
-
- See the folder MSLpatches.
-
- (* *) TO DO
-
- clean up use of errno
-
- MSL chdir changed, works for StdFile?
-
- nice to check type/creator in probe_image() uio.c
-
- (* ************************************************************************* *)
-
- Mosml Mac 1.41e Release Notes 11Oct96 e
-
- These are release notes for the Macintosh version of Moscow ML 1.41.
- See the Moscow ML distribution for non-Mac-specific notes.
-
- Changes since Moscow ML 1.40
-
- 1/ A bug which prevented the Mac m68k versions of Moscow ML from launching
- on some Macs running MacOS versions earlier than System 7.1.2 has been fixed.
- Thanks to Nazareth A. Karjian and Alexy Khrabrov for reporting this bug
- and helping me track it down.
-
- 2/ A bug which prevented the Mac m68k versions of Moscow ML from correctly
- reporting the lack of FPU or M68020 instructions has been fixed.
-
- 3/ The runtime may quit a little more gracefully in very low memory situations.
-
- Changes since Moscow ML 1.31
-
- - Toplevel
- - Runtime
- - Libraries
- - Tools
-
- Toplevel
- --------
-
- The herald now reads:
- Moscow ML version 1.40 (1 July 1996)
- Mangled by e & MacMake 15 July 1996
- Use the Enter key to evaluate an input expression.
- The bit about the Enter key is meant to help new users over the Return
- versus Enter key hurdle (especially when the README has gone unread).
-
- Runtime
- -------
-
- 1/ A new Command menu item has been added: End of Input. It is intended
- to emulate the Control-D in UNIX. This was done at the request of a user
- (Jonas Barklund) who has students using both the Mac and UNIX versions.
- Using the End of Input command, or its command key equivalent <Command-;>
- (that's the Command key and Semicolon) from toplevel will cause Mosml to
- quit. Using the End of Input command while awaiting input will cause any
- typed characters to be Entered, and then whatever characters are available
- to be returned, even if there are none or fewer than requested.
-
- 2/ The Console now remembers the end point of the last input (plus Mosml's
- response, if any) and refuses to allow backspacing past that point. It
- beeps in response. This fixes a couple problems. For example, typing an
- expression without a trailing semicolon results in no response; previously,
- many users would then backspace to the previous line, add the semicolon,
- and type Enter (rather then simply typing the semicolon and Enter). This
- resulted in the expression being entered twice. Now, the Console will
- prevent you from backing up to connect two text "runs." You can still use
- Cut or Clear to remove text from the Console window.
-
- 3/ The Console and edit windows now do "live scrolling." To see it, grab
- any scrollbar's "thumb" indicator, and drag it.
-
- 4/ There are now FPU-required and no-FPU (SANE) versions of the m68k
- runtime. At launch mosml will complain if the hardware resources are
- not sufficient to support the application.
-
- 5/ A new command in the Search menu, Open Selection, can be used to open a
- file by selecting its name in any window and typing Command-D. This can also
- be used with mosml's error messages; in this case the file that caused the
- error will be opened, and the error text scrolled-to and highlighted. For
- example, selecting the line:
- File "errortest.sml", line 3-6, characters 4-75:
- and typing Command-D (or selecting the Open Selection menu item) will open
- the file errortest.sml in an edit buffer with the four lines highlighted.
- This only works for files in the current directory, but this is almost always
- where files will be if the compiler is complaining about them.
-
- 6/ The runtime is a little better about handling low memory situations. There
- is a new low memory alert, and opening new files is disabled until sufficient
- memory becomes available. There are some small memory configurations (e.g.,
- PPC 1024k) where, due to the hysteresis built into the mechanism, once the low
- memory condition is detected, it is impossible to open any more files until
- you restart mosml... but at least you will be able to save files.
-
- Libraries
- ---------
-
- 1/ All the new Mosml Std Basis Library functions are supported, I think.
-
- 2/ I've changed Path.sml once again. The pathname rules are the same,
- but the name "foo" is now canonical; before it was ":foo" which had
- some undesirable consequences. As a result of the change, the Path.base
- of "foo.bar" is now "foo" instead of ":foo" -- progress!?
-
- 3/ Warning: On my PPC, (and perhaps on some 68k Macs) it sometimes looks as
- if runtime is moving backwards, causing a Time.Time exception. This happens
- rarely, most often the first time the timer is used. I'm looking for a
- solution; Apple Tech support says "yeah, we know."
-
- Tools
- -----
-
- A folder of notes and utilities that I use to make the release are
- included in the source distribution. Use at your own risk.
-
- e [Doug Currie <e@flavors.com>]
-